<?php
/**
 * Created By PhpStorm
 * Author: patrick wu
 * Date: 2020/11/17
 * Time: 14:23
 */
namespace App\Http\Model\Mysql;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
use Laravel\Passport\HasApiTokens;
use Illuminate\Foundation\Auth\User as Authenticatable;

class BoxOwnerModel extends Authenticatable
{
    use Notifiable, HasApiTokens;

    protected $table    =   'mini_box_owner';

    protected $guarded  =   [];

    protected $dateFormat   =   'U';

    /**
     * 定义连接盒子列表
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function box()
    {
        return $this->hasMany(BoxModel::class, 'owner_id', 'id');
    }
}
